home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wild Blue Yonder 1: 50 Years of Gs & Jets
/
Wild Blue Yonder - Episode 1 - 50 Years of Gs and Jets (Digital Ranch) (Spectrum Holobyte)(1-107-40-101)(1994).iso
/
splash.dir
/
00009_Script_9
< prev
next >
Wrap
Text File
|
1994-08-29
|
5KB
|
231 lines
on startMovie
global mooV
set the visibility of sprite mooV = 0
load
end startMovie
on load
preLoadCast "DRlogo.mov", "WBY"
end load
on playQT
global mooV, mooVCast, mooVVol, volumes
set the movieTime of sprite mooV = 0
set the visibility of sprite mooV = 1
set the volume of sprite mooV = volumes( mGet, mooVVol )
set the movieRate of sprite mooV = 1
repeat while the movieRate of sprite mooV
updateStage
end repeat
set the visibility of sprite mooV = 0
end playQT
on titleAudio
set the volume of sound 1 = 255
sound playFile 1, string("@:Audio:titles.aif")
startCutTimer
end titleAudio
on startCutTimer
global cutStartTime
set cutStartTime = the timer
end startCutTimer
on waitForFlyby
repeat while playTime() < 180
end repeat
end waitForFlyby
on playTime
global cutStartTime
return the timer - cutStartTime
end playTime
on waitForSoundEnd
repeat while soundBusy( 1 )
end repeat
end waitForSoundEnd
on launchProgram
global CDorHDroot
go to movie CDorHDroot & "Overview"
end launchProgram
------------------------------------------------------------
-- Handlers in this section control the ambient sound.
-- They are stripped-down versions of the sound handlers
-- used throughout the disk. The names are the same, but
-- in some cases a handler's name may seem unrelated to its
-- function, because it is not required to do as much as it
-- was originally designed to do. (Crossfades and fade outs
-- are not needed here, for example, because the next movie
-- is launched before the sound finishes.)
------------------------------------------------------------
on initAmbience
global ambienceCode
set ambienceCode = 1
-- Start the volumes at zero, so that later, when an era movie
-- starts, its chooseChannel handler will work properly.
set the volume of sound 1 = 0
set the volume of sound 2 = 0
countSounds
startAmbience
end initAmbience
on startAmbience
chooseChannels
crossFade
end startAmbience
on countSounds
global overviewSounds
set overviewSounds = 1
end countSounds
on chooseChannels
global inChannel, outChannel
set inChannel = 2
set outChannel = 1
end chooseChannels
on crossFade
global inChannel, outChannel, fadeInLength
set temp = inChannel
set inChannel = outChannel
set outChannel = temp
chooseCut
initFadeIn( inChannel )
fadeIn( inChannel, fadeInLength )
playCut
end crossFade
on checkAmbience
global fadedIn, inChannel, fadeInLength
if not fadedIn then fadeIn( inChannel, fadeInLength )
else go (the frame + 1)
-- This last line is new. When the audio is fully faded in,
-- the playback head advances so that the next movie will
-- start.
end checkAmbience
on chooseCut
global cut
set cut = 1
end chooseCut
on initFadeIn channel
global lastTimeIn, maxVol, volumes, bgVol, fracSumIn, fadedIn
set the volume of sound channel = 0
set lastTimeIn = the timer
set maxVol = volumes( mGet, bgVol )
set fracSumIn = 0
set fadedIn = FALSE
end initFadeIn
on fadeIn channel, length
global lastTimeIn, maxVol, fracSumIn, fadedIn, volumes, bgVol
if the timer > lastTimeIn then
set elapsedTime = (the timer - lastTimeIn) * 1.0000000
set lastTimeIn = the timer
set increment = (elapsedTime/length) * maxVol
set increment = storeFractionIn( increment )
if fracSumIn >= 1 then
set increment = increment + 1
set fracSumIn = fracSumIn - 1
end if
if ((the volume of sound channel) + increment) < maxVol then
set the volume of sound channel = ¼
(the volume of sound channel) + increment
else
set the volume of sound channel = maxVol
set fadedIn = TRUE
end if
end if
end fadeIn
on storeFractionIn n
global fracSumIn
set int = integer( n )
set frac = n - int
if frac < 0 then
set frac = frac + 1
set int = int - 1
end if
set fracSumIn = fracSumIn + frac
return int
end storeFractionIn
on playCut
global inChannel, ambience, CDroot, cut, Win
set selection = "wind.aif"
if the machineType = Win then set soundPath = ¼
the pathname & "Audio\Ambience\" & selection )
else set soundPath = ¼
the pathname & "Audio:Ambience:" & selection )
sound playFile inChannel, soundPath
startCutTimer
end playCut